package com.turing.post.organization.util;

import java.math.BigInteger;
import java.util.Date;

import javax.ejb.Local;
import javax.ejb.Remote;

import com.turing.post.util.PCPSApplicationException;
import com.turing.post.util.PCPSWebInput;

@Remote
@Local
public interface MerchantFeePolicyBusiness {

	/**
	 * 计算持卡人商户交易折扣/手续费
	 * 
	 * @param merchantNo
	 *            商户号
	 * @param mrchBranchNo
	 *            商户机构号
	 * @param tranDate
	 *            交易日期
	 * @param tranType
	 *            交易类型(0-消费,1-充值)
	 * @param businessType
	 *            业务类型
	 * @param cardNo
	 *            卡号
	 * @param amount
	 *            发生额
	 * @return MerchantCardFee
	 */
	public MerchantCardFee calcCardHolderFee(String merchantNo,
			String mrchBranchNo, Date tranDate, String tranType,
			String businessType, String cardNo, BigInteger amount);
	
	/**
	 * 新增持卡人商户交易折扣/手续费
	 * @param webInput
	 * @param mfp
	 * @throws PCPSApplicationException
	 */
	public void insertMerchantFeePolicy(PCPSWebInput webInput,MerchantFeePolicy mfp)throws PCPSApplicationException;
	
	/**
	 * 修改插入持卡人商户交易折扣/手续费
	 * @param webInput
	 * @param mfp
	 * @throws PCPSApplicationException
	 */
	public void updateMerchantFeePolicy(PCPSWebInput webInput,MerchantFeePolicy mfp)throws PCPSApplicationException;
	
	/**
	 * 删除持卡人商户交易折扣/手续费
	 * @param webInput
	 * @param mrchFeePolicyId
	 * @throws PCPSApplicationException
	 */
	public void deleteMerchantFeePolicy(PCPSWebInput webInput,BigInteger mrchFeePolicyId)throws PCPSApplicationException;
	
	/**
	 * 审核通过
	 * @param webInput
	 * @param mrchFeePolicyId
	 * @throws PCPSApplicationException
	 */
	public void authMerchantFeePolicy(PCPSWebInput webInput,BigInteger mrchFeePolicyId)throws PCPSApplicationException;
	
	/**
	 * 审核拒绝
	 * @param webInput
	 * @param mrchFeePolicyId
	 * @throws PCPSApplicationException
	 */
	public void unAuthMerchantFeePolicy(PCPSWebInput webInput,BigInteger mrchFeePolicyId)throws PCPSApplicationException;
	
	/**
	 * 无效设置
	 * @param webInput
	 * @param mrchFeePolicyId
	 * @throws PCPSApplicationException
	 */
	public void closeMerchantFeePolicy(PCPSWebInput webInput,BigInteger mrchFeePolicyId)throws PCPSApplicationException;
}
